#include <iostream>
#include "RandomSequence.h"

int main() {
    int a[50] = {0};
    int used[50] = {0};
    int used1[20] = {0};
    for(int i = 0; i < 50; i++)
        a[i] = i;
    generateRandomSequence(a, 50);
    for (int i : a) {
        std::cout<< i <<"->";
        used[i] += 1;
        if(used[i] > 1)
        {
            std::cerr<<"there is something wrong in this method"<<std::endl;
            exit(1);
        }
    }
    std::cout<<"\nright answer"<<std::endl;
    auto* s = get0ToN_1RandomSequence(20);
    for(int i = 0; i < 20; i++)
    {
        std::cout<<s[i]<<"->";
        used1[i] += 1;
        if(used1[i] > 1)
        {
            std::cerr<<"there is something wrong in this method"<<std::endl;
            exit(1);
        }
    }
    std::cout<<"\nright answer"<<std::endl;
    free0ToN_1RandomSequence(&s);
    std::cout<<s<<'\n';
    for(int i = 0; i < 10; i++)
        std::cout<<getRandomNumberLessThanN(10)<<'\n';
    return 0;
}